import axios from 'axios'

export const SystemUserService = class SystemUserService {
    static systemUserService = null
    requestUrl = 'http://localhost/systemUsers'

    static getInstance() {
        if (this.systemUserService == null) {
            this.systemUserService = new SystemUserService()
        }
        return this.systemUserService
    }

    /**
     * 保存的方法
     * @param systemUser
     */
    register(systemUser) {
        return axios.post(this.requestUrl, systemUser)
    }

    /**
     * 修改
     * @param systemUser
     */
    update(systemUser) {
        return axios.put(this.requestUrl,systemUser)
    }
}
